<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% response.setHeader("cache-control", "public"); %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css">
    <title></title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: white;
        }
        /* 头部div */
        .head {
            width: 100%;
            background-color: white;
            height: 60px;
            top: 0px;
            left: 0px;
            display: flex;
            z-index: 999;
        }

        /* 返回主页图标 */
        .backhead>img {
            margin-top: 5px;
            margin-left: 200px;
        }

        /* a链接字体颜色 */
        a {
            color: black;
        }

        /* 搜索框 */
        .search_box {
            display: grid;
            grid-template-columns: 5fr 1fr;
            align-items: center;
            margin-left: 40px;
            position: relative;
        }

        .headtext {
            height: 30px;
        }

        .headbut {
            width: 80px;
            height: 34px;
            border: 1px solid black;
            border-left: none;
            background-color: rgba(67, 183, 231);
            font-size: 20px;
            color: aliceblue;

        }

        .headbut:hover {
            background-color: rgb(15, 157, 219);
        }

        .icon-sousuo {
            font-size: 20px;
            background-color: transparent;
        }

        .scrchContent {
            width: 476px;
            height: 200px;
            background-color: white;
            position: absolute;
            top: 47px;
            display: none;
            border: 2px solid black;
            border-top: none;
            z-index: 999;

        }

        .headtext:focus~.scrchContent {
            display: block;

        }

        .scrchContent>li>a {
            text-decoration: none;
            margin-left: 10px;

        }

        .scrchContent>li {
            line-height: 40px;

        }

        .scrchContent>li:hover {
            line-height: 40px;
            background-color: rgb(229, 227, 227);
        }

        /* 头部右边列表 */
        .head_ul2 {
            position: absolute;
            right: 60px;
        }

        .head_ul2>li {
            float: left;
            line-height: 60px;
            margin-left: 30px;
            font-size: 20px;
        }

        /* 消息下拉动画 */
        .head_downbox {
            width: 60px;
            margin: auto;
        }

        .head_downcenter {
            position: absolute;
            top: 60px;
            right: 85px;
            width: 100px;
            height: 180px;
            border: 1px solid black;
            border-radius: 3px;
            background-color: white;
            display: none;
            z-index: 999;

        }


        .head_downcenter_ul {
            font-size: 15px;
            line-height: 26px;
        }

        .head_downcenter_ul>li>a {
            text-decoration: none;

        }

        .head_downcenter_ul>li:hover {
            background-color: rgb(229, 227, 227);


        }


        .head_downbox:hover~div {
            display: block;
        }

        .head_downcenter:hover {
            display: block;
        }

        .Box {
            width: 1000px;
            height: 700px;
            background-color: white;
            margin: 0 auto;
            display: flex;
            margin-top: 20px;
        }

        .quanbu {
            width: 250px;
            height: 650px;
            background-color: #f5f8fa;
            border: 1px solid darkgray;
        }

        .fenlei {
            width: 250px;
            height: 35px;
            background-color: #3f95e5;
            line-height: 28px;
            color: white;
            border-radius: 2px;
        }

        .grid-item {
            background-color: #f5f8fa;
            padding: 10px;
            padding-bottom: 2px;
            border-bottom: 1px dashed darkgray;
        }

        .grid-item:hover {
            background-color: white;
        }

        .middle {
            width: 725px;
            display: grid;
            grid-template-columns: auto auto;
            margin-left: 5px;
            border: 1px solid lightgray;
        }

        .middle_fenlei {
            width: 360px;
            height: 150px;
        }

        .middle_fenlei a {
            text-decoration: none;
            color: black;
        }

        .middle_fenlei a:hover {
            color: #4169E1;
        }

        li {
            list-style-type: none;
        }

        .foot {
            width: 1200px;
            height: 50px;
            margin: 10px auto;
            letter-spacing: 2px;

        }

        .foot a {
            text-decoration: none;
            color: #000000;
        }
    </style>
</head>
<body>
<div class="head">
    <a href="${pageContext.request.contextPath}" class="backhead"><img
            src="${pageContext.request.contextPath}/images/logo1.jpg" width="110px"
            height="50px"
            id="headlogo"></a>

    <div class="search_box">
        <input type="text" class="headtext" maxlength="25">
        <button type="submit" class="headbut"><span class="iconfont icon-sousuo"></span>
            搜索
        </button>
        <div class="scrchContent">
            <li><a href="">网页123123</a></li>
            <li><a href="">资讯123123123</a></li>
            <li><a href="">视频123123123</a></li>
            <li><a href="">图片123123123</a></li>
            <li><a href="">知道23123</a></li>
        </div>

    </div>

    <ul class="head_ul2">
        <c:choose>
            <c:when test="${user.userName==null}">
                <li><a href="${pageContext.request.contextPath}/login">登录/注册 </a></li>
            </c:when>
            <c:otherwise>
                <li><a href="${pageContext.request.contextPath}/mydata">${user.petName}</a></li>
                <li>
                    <div class="head_downbox">
                        <p align="center">消息<span class="iconfont icon-xiala"></span></p>
                    </div>
                    <div class="head_downcenter">
                        <ul class="head_downcenter_ul">
                            <li><a href="">查看私信 </a></li>
                            <li><a href="">回复私信</a></li>
                            <li><a href="">查看@提到我</a></li>
                            <li><a href="">查看好友申请</a></li>
                            <li><a href="">查看新粉丝</a></li>
                            <li><a href="">我的收藏</a></li>
                            <li><a href="">我的通知</a></li>
                        </ul>
                    </div>
                </li>
                <li><a href="">问题反馈</a></li>
                <li><a href="${pageContext.request.contextPath}/logout">注销</a></li>
            </c:otherwise>
        </c:choose>
    </ul>
</div>
<div class="Box">
    <div class="quanbu">
        <div class="fenlei">全部论坛分类</div>
        <c:forEach items="${applicationScope.onetypename}" var="onetypename">
            <div class="grid-item">&nbsp;${onetypename}</div>
        </c:forEach>
    </div>
    <div class="middle">
        <c:forEach items="${applicationScope.AllTypesName}" var="mymap">
            <div class="middle_fenlei">
                <ul>
                    <li>
                        &nbsp;&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/" style="color: deepskyblue">${mymap.key}</a>
                    </li>
                    <br>
                    <c:forEach items="${mymap.value}" var="twotypename">
                        &nbsp;&nbsp;&nbsp;<a href=" " style="font-size: small">${twotypename} &nbsp;|&nbsp;</a>
                    </c:forEach>
                </ul>
            </div>
        </c:forEach>
    </div>
</div>
<div class="foot">2022 <a href="">使用轻语前必读协议</a> <a href="">隐私政策</a> <a href="">投诉反馈</a> <a href="">信息网络传播视听节目许可证</a>
    438438 违法和不良信息举报电话：000-000-0000网络服务 438</div>
</body>
</html>
